<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

/**
 * --------------------------------------------------------------------------
 * PUBLIC CONTROLLER
 * --------------------------------------------------------------------------
 * Site tarafı ana controller dosyası.
 *
 * @package default
 * @author Ali
 * */
class Public_Controller extends CI_Controller {

	public function __construct()
	{
		parent::__construct();

		// load and init template lib
		$this->load->library('template');
		$this->template->set_side('frontend');
		
		// LOAD FACEBOOK LIBRARY
		$config = array(
			'appId' => setting('app', 'id'),
			'secret' => setting('app', 'secret')
		);

		$this->load->library('facebook/facebook', $config);			
	}

}

/* End of class Public_Controller */

/* ----------------------------------------------------------------------- */

/**
 * --------------------------------------------------------------------------
 * ADMIN CONTROLLER
 * --------------------------------------------------------------------------
 * Admin tarafı ana controller dosyası
 *
 * @package default
 * @author Ali
 * */
class Admin_Controller extends CI_Controller {

	public function __construct()
	{
		parent::__construct();

		// Check permission
		$roles = array(1, 2, 3, 4, 5);
		if (!$this->auth->check_permission($roles))
		{
			redirect('panel');
		}
		
		// load and init template lib
		$this->load->library('template');
		$this->template->set_side('backend');
	}

}

/* End of class Admin_Controller */

/* End of file my_controller.php */
